<template>
		<view class="recommend_item"  @click="jump_detail(videoList)">
			<view class="item_pic">
				<image :src="videoList.data.coverUrl" class="pic" mode=""></image>
				<view class=" plays icon iconfont icon-bofang flex"><i>{{videoList.data.praisedCount?videoList.data.praisedCount:videoList.data.playCount}}</i></view>
			</view>
			<view class="item_txt" >{{videoList.data.title?videoList.data.title:videoList.data.name}}</view>
		
		</view>
	</view>
</template>
<script>
	export default {
		name:'videoList',
		methods:{
			// 跳转视频详情
			jump_detail(items){
				// 将数据存入缓存中(点击的视频信息)
				uni.setStorageSync('videoDetail',items)
				// 跳转详情
				uni.navigateTo({
					url:'../videoDetail/videoDetail'
				})
			}
		},
		props:['videoList']
	}

</script>

<style lang="less" scoped>
		.recommend_item {
			width: 330rpx;
			margin-bottom: 25rpx;
			.item_pic {
				height: 229rpx;
				position: relative;
				.plays{
					position: absolute;
					bottom: 0;
					color: #FFFFFF;
					i{
						font-size: 24rpx;
						margin-left: 10rpx;
					}
				}
			}
			.item_txt {
				height: 117rpx;
				padding:10rpx 10rpx  20rpx 10rpx;
				background-color: #ffffff;
				border-radius: 10rpx;
				line-height: 50rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
			}
		}
</style>
